Storing the Fonts

Now we have the fonts, where do we store them? TEX, and the various driver programs are compiled with default locations written in. These can be overridden by certain environment variables. The names of these variables differ between systems, but on UNIX they might, for example, be `TEXFONTS' for the TFM files, and either `PKFONTS' or `TEXPKS' (or both of those) — before searching `TEXFONTS' — for PK fonts. You can find out what environment variables you now have by typing `set' in MS-DOS and `env' in the Bourne shell, sh, in UNIX. In the UNIX C shell, csh, type `setenv'.

Michał JAEGERMANN notes that on a `virgin' installation — in which everything is in default directories and no environment variables have yet been set — that won't succeed. Presumably we're talking to system installers now. So, as a first resort:

Read The Manual.
As a last resort, one can discover default values and environment variable names by using a command like UNIX's strings on the executable files. For instance:
    strings -6 /bin/virmf | less
(Use `more' or `pg' for paging, if `less' is not available.) Seeking 6-letter names is about right, as ``TEXPKS'' has six letters, while strings' default of four collects too much random noise. Environment variables are usually in upper case, and their names strongly hint at their purposes. Default locations may be discovered by looking for path name strings.

Using this advice may show some undocumented names. If you have the program sources, you may check their purpose. Otherwise, not to worry, the important ones should be self-evident. As an illustration, here are some environment variable names found by applying ``strings -6'' to ROKICKI'S dvips:

    * DVIPSHEADERS
      HOME
    * PKFONTS
      PRINTER
      TEXCONFIG
      TEXFONTS
      TEXINPUTS
    * TEXPACKED
    * TEXPICTS
      TEXPKS
      VFFONTS
The four starred names are not documented by the dvips manual (for version 5.484). In Karl BERRY'S dvipsk, a variant of dvips, DVIPSHEADERS5, PKFONTS and TEXPICTS are documented, while TEXPACKED is not used.

If you want TEX and to find files in the current directory (as you almost certainly do!), then one way is to put `.' into their search paths. (Both UNIX and MS-DOS accept the . notation for the current directory.) Default search paths are compiled into TEX and , but users can customise the environment variables (see subsection [*]) that the programs read, to override the defaults.

(as illustrated in section [*] above), as well as the DVI drivers, can also be given full path specifications for input files. (On most systems, so can TEX, but, as Berthold K. P. HORN (bkph@kauai.ai.mit.edu) has observed, MS-DOS poses the problem that the backslash `\' used in MS-DOS path names is very special in TEX input. However, I'll leave solving that one to the TEXackers.)

On the other hand, you may be content with your new font, and you may have write access to the place where most of the fonts are stored. In that case, copy your font to there. There will be a place for the TFM files, and another for the PK files. It's up to you or your local system administrator(s) to know where these directories are, because their names are very locale dependent.